package com.android.binderserverclient0.workmanager

import android.content.Context
import android.util.Log
import androidx.work.Worker
import androidx.work.WorkerParameters

class DoChainWorker(context: Context, workerParameters: WorkerParameters) :
    Worker(context, workerParameters) {

    override fun doWork(): Result {
        when (inputData.getString(OP_KEY)) {
            OP_CHECK_NET -> {
               Log.d(TAG,"OP_CHECK_NET")
            }
            OP_CHECK_DISK -> {
                Log.d(TAG,"OP_CHECK_DISK")
            }
            OP_CHECK_SYSTEM -> {
                Log.d(TAG,"OP_CHECK_SYSTEM")
            }
            else -> {}
        }
        return Result.success()
    }

    companion object {
        const val TAG = "DoChainWorker"
        const val OP_KEY = "op_key"
        const val OP_CHECK_DISK = "op_check_disk"
        const val OP_CHECK_NET = "op_check_net"
        const val OP_CHECK_SYSTEM = "op_check_system"
    }

}